package com.example.coffeejava.Entity;

import com.example.coffeejava.Dto.UserDto;

public class UserHolder {
    private static final ThreadLocal<UserDto> tl=new ThreadLocal<>();
    public static void saveUser(UserDto userDto){
        tl.set(userDto);
    }
    public static UserDto getUser(){
        System.out.println(tl.get());
        return tl.get();
    }
    public static void removeUser(){
        tl.remove();
    }
}
